package model.base;
import java.util.Date;

import com.jfinal.plugin.activerecord.IBean;

import enums.DaliyRecordType;

/**
 * do not modify this file.^_^
 */
@SuppressWarnings("serial")
public abstract class BaseDaliyRecord<M extends BaseDaliyRecord<M>> extends _BaseModel<M> implements IBean {

    /**
     * ID
     */
    public void setId(Long id) {
        set("id", id);
    }

    /**
     * ID
     */
    public Long getId() {
        return getLong("id");
    }
    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        set("createTime", createTime);
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return get("createTime");
    }
    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        set("updateTime", updateTime);
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return get("updateTime");
    }
    /**
     * 类型
     */
    public void setType(Integer type) {
        set("type", type);
    }

    /**
     * 类型
     */
    public Integer getType() {
        return getInt("type");
    }
    /**
     * 维护项目
     */
    public void setDaliyItemsId(Long daliyItemsId) {
        set("daliyItemsId", daliyItemsId);
    }

    /**
     * 维护项目
     */
    public Long getDaliyItemsId() {
        return getLong("daliyItemsId");
    }
    /**
     * 是否正常
     */
    public void setIsNormal(Boolean isNormal) {
        set("isNormal", isNormal);
    }

    /**
     * 是否正常
     */
    public Boolean getIsNormal() {
        return get("isNormal");
    }
    /**
     * 备注
     */
    public void setRemark(String remark) {
        set("remark", remark);
    }

    /**
     * 备注
     */
    public String getRemark() {
        return getStr("remark");
    }
    /**
     * 点位
     */
    public void setStationId(Long stationId) {
        set("stationId", stationId);
    }

    /**
     * 点位
     */
    public Long getStationId() {
        return getLong("stationId");
    }
    /**
     * 运维公司
     */
    public void setServicerId(Long servicerId) {
        set("servicerId", servicerId);
    }

    /**
     * 运维公司
     */
    public Long getServicerId() {
        return getLong("servicerId");
    }
    /**
     * 维护人员
     */
    public void setRecorder(String recorder) {
        set("recorder", recorder);
    }

    /**
     * 维护人员
     */
    public String getRecorder() {
        return getStr("recorder");
    }
    /**
     * 巡检记录ID
     */
    public void setRecorderId(Long recorderId) {
        set("recorderId", recorderId);
    }

    /**
     * 巡检记录ID
     */
    public Long getRecorderId() {
        return getLong("recorderId");
    }

	public boolean isWaterType(){
        return null != getType() && DaliyRecordType.getWater() == getType() ;
    }

	public void setWaterType(){
    	setType(DaliyRecordType.getWater());
    }

	public boolean isGasType(){
        return null != getType() && DaliyRecordType.getGas() == getType() ;
    }

	public void setGasType(){
    	setType(DaliyRecordType.getGas());
    }
}
